home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / atool201.zip / DEMOFUNC.C < prev    next >
C/C++ Source or Header  |  1993-07-14  |  2KB  |  59 lines

  1. /*
  2.     DEMOFUNC.C -- program to demonstrate the abilities of
  3.         Tool Bar control implemented in ESTOOLS.DLL. Provided for the 
  4.     registered users of ESTOOLS only. NOT for redistribution.
  5.     Copyright (C) Eugene Sokolov 1992-93, (USA)-(516)632-7892,
  6.     esokolov@sbchm1.chem.sunysb.edu
  7.  
  8.     You can freely copy or change this file as long
  9.     as this notice remains intact.
  10. */
  11. #define STRICT
  12. #include "estools.h"
  13.  
  14. void ES_TB_Toggle_Enable_Disable_Demo( HWND hwnd, int btn )
  15. {
  16.    SendMessage( hwnd, TBM_SETBTNSTYLE, btn,
  17.       MAKELONG(TBB_DISABLED ^ SendMessage( hwnd, TBM_GETBTNSTYLE, btn,
  18.       MAKELONG(0,0x751)),0x751) );
  19. }
  20.  
  21. void ES_TB_Toggle_Standard_2State_Demo( HWND hwnd, int btn )
  22. {
  23.    SendMessage( hwnd, TBM_SETBTNSTYLE, btn,
  24.       MAKELONG(TBB_2STATE ^ SendMessage( hwnd, TBM_GETBTNSTYLE, btn,
  25.       MAKELONG(0,0x751)),0x751) );
  26. }
  27.  
  28. void ES_TB_Toggle_Standard_Auto2State_Demo( HWND hwnd, int btn )
  29. {
  30.    SendMessage( hwnd, TBM_SETBTNSTYLE, btn,
  31.       MAKELONG(TBB_AUTO2STATE ^ SendMessage( hwnd, TBM_GETBTNSTYLE, btn,
  32.       MAKELONG(0,0x751)),0x751) );
  33. }
  34. void ES_TB_Toggle_Popup_Child_Demo( HWND hwnd )
  35. {
  36.    SendMessage( hwnd, TBM_SETTBSTYLE,
  37.    (TBS_POPUP ^ SendMessage( hwnd, TBM_GETTBSTYLE, 0, MAKELONG(0,0x751) )),
  38.    MAKELONG(0,0x751) );
  39. }
  40. void ES_TB_Toggle_Movable_Fixed_Demo( HWND hwnd )
  41. {
  42.    SendMessage( hwnd, TBM_SETTBSTYLE,
  43.    (TBS_FIXED ^ SendMessage( hwnd, TBM_GETTBSTYLE, 0, MAKELONG(0,0x751) )),
  44.    MAKELONG(0,0x751) );
  45. }
  46.  
  47. void ES_TB_Toggle_BorderStyle_Demo( HWND hwnd )
  48. {
  49.    SendMessage( hwnd, TBM_SETTBSTYLE,
  50.    (TBS_BORDER ^ SendMessage( hwnd, TBM_GETTBSTYLE, 0, MAKELONG(0,0x751) )),
  51.    MAKELONG(0,0x751) );
  52. }
  53. void ES_TB_Set_Number_of_Controls_Demo( HWND hwnd, int nContr )
  54. {
  55.    LRESULT lr;
  56.    lr=SendMessage( hwnd, TBM_GETTBSTYLE, 0, MAKELONG(0,0x751) );
  57.    SendMessage( hwnd, TBM_SETTBSTYLE,
  58.       (WPARAM)LOWORD(lr), MAKELONG(nContr,0x751) );
  59. }